//
//  TestMarqueeLabel.h
//  MKUITestApp
//  左右循环滚动的跑马灯效果
//  Created by 苏尚进 on 2025/9/23.
//  Copyright © 2025 moon. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <MKUI/MKUI.h>
NS_ASSUME_NONNULL_BEGIN

@interface MKUIMarqueeView : UIView
@property(nonatomic,strong,nullable) UIView *contentView;//进行跑马灯循环滚动展示的内容
@property(nonatomic,assign) UIEdgeInsets contentInsets;//内容的内边距，默认为(0,0,0,0)
@property(nonatomic,assign) CGFloat speed;//动画速度，单位为px/s，默认为40px/s
@property(nonatomic,assign) BOOL enableAnimation;//是否允许跑马灯动画，默认为YES
@property(nonatomic,assign) BOOL animationBeginFromRightEdge;//开始跑马灯动画，是否从最右边开始,默认为NO
/// 当滚动内容变更时，通知刷新内容，以更新跑马灯滚动动画
- (void)refreshContentView;
@end

@interface MKUIMarqueeLabel : MKUIMarqueeView
@property(nonatomic,readonly) UILabel *textLabel;//进行跑马灯循环滚动展示的内容
@property(nonatomic,strong,nullable) NSString *text;//设置文本时，会将\n或\r转换为空格
@property(nonatomic,strong,nullable) NSAttributedString *attributedText;
@property(nonatomic,strong,null_resettable) UIColor *textColor;
@property(nonatomic,strong,null_resettable) UIFont *font;
@property(nonatomic,assign) NSInteger numberOfLines;
@end

NS_ASSUME_NONNULL_END
